<template>
	<view>
		<!-- <view >
		<view  class="Dahezi" >
		<view v-for="(item,index) in list" class="Xiaoerzi" :key="index" :class='index==findindex?"action":""' @click="undianj(index)">{{item.name}}</view>
		
		</view>
		<view class="Hzi" v-for="(item,index) in list[findindex].children">
			<view class="Fatrea">
				<view class="fatreas">{{item.titx}}</view>
				<view class="diErcen">
				<view class="tetx">{{item.titxname}}</view>
				<view class="rigth"  @click="dianTiao(item.titx)">{{item.adu}}</view>
				</view>
			</view>
			
		</view>
		</view> -->
		<view class="dsa">
			
		</view>
	</view>
</template>

<script>
	import {
		mapMutations,
	} from 'vuex'
	export default {
		data(){
			return{
				findindex:0,
				//这是首页的数据
				list:[]
			}
		},
		methods:{
			...mapMutations('users', ['cjhz']),
			undianj(index){
				console.log(index)
				this.findindex=index
			},
			//这是首页的数据
		 async get(){
				const res=await uni.$http.get('/64647ed15bbac3001ab9f3a7/example/arr')
				console.log('这是自己的接口',res)
				this.list=res.data.data.list
				console.log('xind',this.list)
			},
			dianTiao(name){
				console.log(name)
				uni.setStorageSync('name', name)
				uni.navigateTo({
					url:"/subpkg/kaoshilist/kaoshilist?name="+name
				})
			}
		},
		mounted(){
			this.get()
			
		}
	}
</script>

<style>
	.dsa{
		background-image: url('../../static/image/加星收藏_填充.png');
		height: 300px;
		width: 300px;
	}
	.Dahezi{
		display: flex;
		background-color: white;
		height: 50px;
		
	}
	.Xiaoerzi{
		margin-left: 20px;
		padding-top: 15px;
		
	}
	.action{
		color: aqua;
		border-bottom:1px solid aqua ;
	}
	.Fatrea{
	width: 80%;
	margin: 0 auto;
	background-color: white;
	height: 100px;
	border-radius: 13px;
	}
	.Hzi{
		margin-top: 10px;
		
	}
	.diErcen{
		display: flex;
		margin-top: 30px;
	}
	.rigth{
		font-size: 13px;
		margin-left: 45px;
		background-color: rgb(253,240,240);
		color: rgb(248, 197, 199);
	}
	.fatreas{
		font-weight: bold;
	}
	.tetx{
		font-size: 15px;
	}
</style>